<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>window属性</title>
		<script>
			function showWinInfo(){
				//alert("分辨率:"+window.screen.height+"X"+window.screen.width);
				//alert("浏览器窗口大小:"+window.outerHeight+"X"+window.outerWidth);
				//alert("浏览器窗口显示区域大小:"+window.innerHeight+"X"+window.innerWidth);
				alert("host:"+window.location.host);
				alert("hostname:"+window.location.hostname);
				alert("href:"+window.location.href);
			}	
			function changeWin(){
				window.alert("准备去百度");
				window.location="https://www.baidu.com";
			}
			function closeWin(){
				if(window.confirm("你真的不多做一会?"))
				{
					window.close();
				}
			}
			function openZb(){
				window.open("http://www.bdqn.cn","bdqn","location=no,fullscreen=yes");
			}
			function ref(){
				window.location.reload();
			}
			function repUrl(){
				window.location.replace("http://www.bdqn.cn");
			}
		</script>
	</head>
	<body>
		<input type="button" value="显示Window属性" onclick="showWinInfo()"/>
		<input type="button" value="更换location" onclick="changeWin()"/>
		<input type="button" value="关闭窗口" onclick="closeWin()"/>
		<input type="button" value="打开青鸟总部" onclick="openZb()"/>
		<input type="button" value="后退" onclick="window.history.back()"/>
		<input type="button" value="refresh" onclick="ref()"/>
		<input type="button" value="替换" onclick="repUrl()"/>
		
	</body>
</html>
